package cn.ljy.uem.web.action.backstage.school;

import cn.ljy.authority.web.controller.backstage.BaseBackstageController;
import cn.ljy.common.model.result.ResponseData;
import cn.ljy.uem.model.SchoolTeachingTaskComment;
import cn.ljy.uem.model.query.SchoolTeachingTaskCommentQuery;
import cn.ljy.uem.service.SchoolTeachingTaskCommentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;


/**
 * 学校教学班评论控制器置评
 *
 * @author 廖振豪
 * @date 2022/09/15
 */
@Api(tags = "后台的教学班评论模块")
@RestController
@RequestMapping(value = "/api/backstage/school/schoolTeachingTaskComment")
public class SchoolTeachingTaskCommentController extends BaseBackstageController<SchoolTeachingTaskComment, SchoolTeachingTaskCommentQuery, String> {

    @Autowired
    private SchoolTeachingTaskCommentService schoolTeachingTaskCommentService;

    @ApiOperation(value = "教学班评论")
    @GetMapping("/all")
    @Override
    protected ResponseData query(SchoolTeachingTaskCommentQuery schoolTeachingTaskCommentQuery) {
        return super.query(schoolTeachingTaskCommentQuery);
    }


    @ApiOperation(value = "读取教学班评论")
    @Override
    protected ResponseData get(@PathVariable("id") String id) {
        return super.get(id);
    }

    @ApiOperation(value = "批量删除指定的教学班评论")
    @Override
    protected ResponseData deletes(@NotEmpty(message = "操作失败：请选择要移除的记录") String[] ids) {
        return super.deletes(ids);
    }


    @ApiOperation(value = "添加教学班评论")
    @Override
    protected ResponseData add(@Valid @RequestBody SchoolTeachingTaskComment schoolTeachingTaskComment) {
        return super.add(schoolTeachingTaskComment);
    }

    @ApiOperation(value = "编辑教学班评论")
    @Override
    protected ResponseData edit(@Valid @RequestBody SchoolTeachingTaskComment schoolTeachingTaskComment) {
        return super.edit(schoolTeachingTaskComment);
    }


}
